			<?
				global $file;
			?>
			<br /><br />
			<!--- Right then !-->
			<div id="finfo" class="infobox">
				<label class="collapser"><?=$file->basename?></label>
				<div>
					<div>
						<div style="text-align:right">
							<em class="helvetica"><?=$file->media_class?>,<br /> <span id="filesize"></span></em>
						</div>
						<? if(($file->rdk == 'docs')&&($file->class != 'htaccess')){ ?> 
							<div style="text-align:right">
							<a href="<?=$file->uri()?>" target="_blank">Preview</a>
							</div>	
						<?	} ?>	
						<em style="color:#666">Editing:</em> 
						<div style="text-align:right">
							<h4><strong id="draftno" style="text-align:right; color:#F39" class="helvetica">Original file</strong></h4>
						</div>
						<div style="margin-top:3px">
							<em style="color:#666">Updated:</em> <br />
								<div id="file_updated" style="text-align:right" class="helvetica"></div>
						</div>
					</div>
				</div>
			</div>
			
			<!-- SAVE !-->
			<div id="savebox" class="infobox">
				<label class="collapser">Save</label>
				<div>
					<div>
						<div style="padding:5px 5px 0 10px">
							<input id="as_chk" type="checkbox" /> <em>Autosave</em>
						</div>
						<div id="as_inp" style="text-align:right; opacity:0.3">
							every <input id="as_mins" type="text" value="2" style="font-size:0.8em; width:2em; color:red" disabled="disabled" /> minutes
						</div>
						<div class="btnwrapper">
							<input type="button" id="save" value="Save" onclick="File.save()" />  <input type="button" onclick="File.saveAs()" value="Save As..." />
						</div>
					</div>
				</div>
			</div>
			
			<!-- TEMPLATE !-->
			<div id="templatebox" class="infobox">
				<label class="collapser">Template</label>
				<div>
					<div>
						<div id="tmpl" style="display:none;">
							<div style="background-image:url(<?=$this->icon('script.png', 32)?>); width:32px; height:32px; float:left"></div>
								<span id="tmplfmrp"></span>
						</div>
						<div class="btnwrapper">
							<input type="button" value="Attach" id="lnkbtn" onclick="File.linkTemplate()" />
						</div>
					</div>
				</div>
			</div>
			
			<!-- DRAFTS WRAPPER !-->
			<div id="candraft" style="border-top:1px dashed #ccc; margin-top:5px; padding-top:5px">
				<!-- DRAFTS !-->
				<div id="draftsbox" class="infobox">
					<label class="collapser">Drafts</label>
					<div>
						<div>
							<div id="draftslist" class="helvetica" style="margin-top:5px">
							
							</div>
							<div class="btnwrapper">
								<input type="button" value="New Draft" onclick="File.newDraft()" />
							</div>
						</div>
					</div>
				</div>
				
				<div id="hasdrafts" style="display:none">
					<!-- USURP !-->
					<div id="usurpbox" class="infobox">
						<label class="collapser">Usurp <sup id="usrpbull">&bull;</sup></label>
						<div>
							<div>
								<div class="btnwrapper">
									<input type="button" id="usurpbtn" value="Usurp!" onclick="File.usurp()" />
								</div>
							</div>
						</div>
					</div>
					<!-- DONE !-->
					<div id="donebox" class="infobox">
						<label class="collapser">Done?</label>
						<div>
							<div>
								<div class="btnwrapper">
									<input type="button" value="Overwrite Original" onclick="File.overwrite()" />
								</div>
							</div>
						</div>
					</div>
					<!-- DISCARD !-->
					<div id="discardbox" class="infobox">
						<label class="collapser">Discard</label>
						<div>
							<div>
								<div class="btnwrapper">
									<input type="button" value="Discard Draft" onclick="Drafts.discard()" />
								</div>
								<div class="btnwrapper">
									<input type="button" value="Discard All Drafts" onclick="Drafts.discard(1)" />
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>			
			